package com.xijing.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JTextArea;
import javax.swing.JButton;

public class FormDemoFrame extends JFrame {

	private JPanel contentPane;
	private JTextField tfCustName;
	private JTextField tfPhone;
	private JTextField tfRoomNum;
	private JTextField tfArrive;
	private JTextField tfGone;
	private JTextField tfOper;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FormDemoFrame frame = new FormDemoFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public FormDemoFrame() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 514, 427);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		tfCustName = new JTextField();
		tfCustName.setBounds(119, 101, 111, 21);
		contentPane.add(tfCustName);
		tfCustName.setColumns(10);
		
		tfPhone = new JTextField();
		tfPhone.setBounds(343, 101, 111, 21);
		contentPane.add(tfPhone);
		tfPhone.setColumns(10);
		
		JComboBox cbRootType = new JComboBox();
		cbRootType.setModel(new DefaultComboBoxModel(new String[] {"标准单人间", "双人间", "总统套房"}));
		cbRootType.setBounds(119, 56, 111, 21);
		contentPane.add(cbRootType);
		
		tfRoomNum = new JTextField();
		tfRoomNum.setBounds(343, 56, 111, 21);
		contentPane.add(tfRoomNum);
		tfRoomNum.setColumns(10);
		
		tfArrive = new JTextField();
		tfArrive.setColumns(10);
		tfArrive.setBounds(119, 144, 111, 21);
		contentPane.add(tfArrive);
		
		tfGone = new JTextField();
		tfGone.setColumns(10);
		tfGone.setBounds(343, 144, 111, 21);
		contentPane.add(tfGone);
		
		tfOper = new JTextField();
		tfOper.setText("管理员");
		tfOper.setEditable(false);
		tfOper.setColumns(10);
		tfOper.setBounds(119, 188, 111, 21);
		contentPane.add(tfOper);
		
		JLabel lblNewLabel = new JLabel("房间类型");
		lblNewLabel.setLabelFor(cbRootType);
		lblNewLabel.setBounds(55, 59, 54, 15);
		contentPane.add(lblNewLabel);
		
		JLabel label = new JLabel("房间号");
		label.setLabelFor(tfRoomNum);
		label.setBounds(279, 59, 54, 15);
		contentPane.add(label);
		
		JLabel label_1 = new JLabel("主客姓名");
		label_1.setLabelFor(tfCustName);
		label_1.setBounds(55, 104, 54, 15);
		contentPane.add(label_1);
		
		JLabel label_2 = new JLabel("联系电话");
		label_2.setLabelFor(tfPhone);
		label_2.setBounds(279, 104, 54, 15);
		contentPane.add(label_2);
		
		JLabel label_3 = new JLabel("抵押时间");
		label_3.setLabelFor(tfArrive);
		label_3.setBounds(55, 147, 54, 15);
		contentPane.add(label_3);
		
		JLabel label_4 = new JLabel("预离时间");
		label_4.setLabelFor(tfGone);
		label_4.setBounds(279, 147, 54, 15);
		contentPane.add(label_4);
		
		JLabel label_5 = new JLabel("操作员");
		label_5.setLabelFor(tfOper);
		label_5.setBounds(55, 191, 54, 15);
		contentPane.add(label_5);
		
		JTextArea taNote = new JTextArea();
		taNote.setBounds(119, 229, 335, 70);
		contentPane.add(taNote);
		
		JLabel label_6 = new JLabel("备注");
		label_6.setLabelFor(taNote);
		label_6.setBounds(55, 233, 54, 15);
		contentPane.add(label_6);
		
		JButton btnSubmit = new JButton("确  定");
		btnSubmit.setBounds(125, 329, 93, 23);
		contentPane.add(btnSubmit);
		
		JButton btnCancel = new JButton("取  消");
		btnCancel.setBounds(287, 329, 93, 23);
		contentPane.add(btnCancel);
	}
}
